package com.fwpsl.springframework.service.Impl;

import com.fwpsl.springframework.dao.UserDaoImpl;
import com.fwpsl.springframework.entity.User;
import com.fwpsl.springframework.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: 风戏fw
 * @date: 2024/5/20
 * @description:
 */
@Service
public class UserServiceImpl implements IUserService {

    /**
     * user dao impl.
     */
    @Autowired
//    @Qualifier("fw")
//    @Resource(name = "fw")
    private UserDaoImpl userDao;

    /**
     * find user list.
     *
     * @return user list
     */
    @Override
    public List<User> findUserList() {
        return this.userDao.findUserList();
    }

    /**
     * set dao.
     *
     * @param userDao user dao
     */
    @Override
    public void setUserDao(UserDaoImpl userDao) {
        this.userDao = userDao;
    }
}
